﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Novel.Web.Models.Entity
{
    [SplitTable(SplitType._Custom01)]
    [SugarTable("chapter")]
    public class BookChapterEntity
    {
        /// <summary>
        /// 主键id
        /// </summary>
        [SugarColumn(ColumnName = "Id", IsPrimaryKey = true)]
        public long Id { get; set; }

        /// <summary>
        /// 小说id
        /// </summary>
        [SugarColumn(ColumnName = "novel_id")]
        [SplitField] //标识一下分表字段
        public long NovelId { get; set; }

        /// <summary>
        /// 小说名
        /// </summary>
        [SugarColumn(ColumnName = "title")]
        public string Title { get; set; } = "";


        /// <summary>
        /// 小说名
        /// </summary>
        [SugarColumn(IsIgnore = true)]
        public IEnumerable<string> Contents { get; set; }
    } 
}
